#!/usr/bin/env sh
beePath='/opt/bee'

mkdir -p $beePath

stop() {
  ps -ef | grep bee | awk '{print $2}' | xargs kill -9
}

installBeeClient() {
  wget https://bbq-chhain.oss-cn-shanghai.aliyuncs.com/files/20191128/bee_0.5.4_amd64.deb
  dpkg -i bee_0.5.4_amd64.deb
  rm -rf bee_0.5.4_amd64.deb*
  sleep 3
  service bee stop
  systemctl disable bee.service
}

stop
installBeeClient
